package cn.starrysky108.simpleerp.core.exception;

import cn.starrysky108.simpleerp.core.enums.ResultCodeEnum;
import lombok.Getter;

/**
 * 自定义token相关异常
 *
 * @author Carl Lee
 */
@Getter
public class TokenException extends ApiException {
    /**
     * 法生错误的token
     */
    private final String token;

    public TokenException(String token, ResultCodeEnum codeEnum) {
        super(codeEnum);
        this.token = token;
    }
    public TokenException(ResultCodeEnum codeEnum, Throwable cause, String token) {
        super(codeEnum, cause, token);
        this.token = token;
    }

    public String getToken() {
        return token;
    }

}
